<?php
    $f = $_GET["f"];
	$partes = explode(".", $f); 
	$extencion = end($partes); 
	if($extencion=="sql"){
		header("Content-type: application/octet-stream");
		header("Content-Disposition: attachment; filename=\"$f\"\n");
		$fp=fopen("$f", "r");
		fpassthru($fp);
	}else{
		echo "Error!!";
	}
?>